<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>std::scoped_allocator_adaptor::construct - cppreference.com</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">


<link rel="shortcut icon" href="../../../../favicon.ico">



<link rel="stylesheet" href="../../../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-css:7:472787eddcf4605d11de8c7ef047234f */</style>

<script src="../../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"cpp/memory/scoped_allocator_adaptor/construct","wgTitle":"cpp/memory/scoped allocator adaptor/construct","wgCurRevisionId":80245,"wgArticleId":5678,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"cpp/memory/scoped_allocator_adaptor/construct","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-js:7:ca03345b1e2c4d90a25d968753a73b92 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-cpp {line-height: normal;}
.source-cpp li, .source-cpp pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for cpp
 * CSS class: source-cpp, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.cpp.source-cpp .de1, .cpp.source-cpp .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.cpp.source-cpp  {font-family:monospace;}
.cpp.source-cpp .imp {font-weight: bold; color: red;}
.cpp.source-cpp li, .cpp.source-cpp .li1 {font-weight: normal; vertical-align:top;}
.cpp.source-cpp .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.cpp.source-cpp .li2 {font-weight: bold; vertical-align:top;}
.cpp.source-cpp .kw1 {color: #0000dd;}
.cpp.source-cpp .kw2 {color: #0000ff;}
.cpp.source-cpp .kw3 {color: #0000dd;}
.cpp.source-cpp .kw4 {color: #0000ff;}
.cpp.source-cpp .co1 {color: #909090;}
.cpp.source-cpp .co2 {color: #339900;}
.cpp.source-cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp.source-cpp .es0 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es1 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es2 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es3 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es4 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es5 {color: #008000; font-weight: bold;}
.cpp.source-cpp .br0 {color: #008000;}
.cpp.source-cpp .sy0 {color: #008000;}
.cpp.source-cpp .sy1 {color: #000080;}
.cpp.source-cpp .sy2 {color: #000040;}
.cpp.source-cpp .sy3 {color: #000040;}
.cpp.source-cpp .sy4 {color: #008080;}
.cpp.source-cpp .st0 {color: #008000;}
.cpp.source-cpp .nu0 {color: #000080;}
.cpp.source-cpp .nu6 {color: #000080;}
.cpp.source-cpp .nu8 {color: #000080;}
.cpp.source-cpp .nu12 {color: #000080;}
.cpp.source-cpp .nu16 {color:#000080;}
.cpp.source-cpp .nu17 {color:#000080;}
.cpp.source-cpp .nu18 {color:#000080;}
.cpp.source-cpp .nu19 {color:#000080;}
.cpp.source-cpp .ln-xtra, .cpp.source-cpp li.ln-xtra, .cpp.source-cpp div.ln-xtra {background-color: #ffc;}
.cpp.source-cpp span.xtra { display:block; }

/*]]>*/
</style>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]-->
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_memory_scoped_allocator_adaptor_construct skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        
        <!-- /header -->
        <!-- content -->
        <div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
                <h1 id="firstHeading" class="firstHeading">
<span style="font-size:0.7em; line-height:130%">std::scoped_allocator_adaptor::</span>construct</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">From cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../../../cpp.html" title="cpp">cpp</a>‎ | <a href="../../memory.html" title="cpp/memory">memory</a>‎ | <a href="../scoped_allocator_adaptor.html" title="cpp/memory/scoped allocator adaptor">scoped allocator adaptor</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
<div class="t-navbar" style="">
<div class="t-navbar-sep"> </div>
<div class="t-navbar-head">
<a href="../../../cpp.html" title="cpp"> C++</a><div class="t-navbar-menu"><div>
<div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="../../language.1.html" title="cpp/language"> Language</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../header.html" title="cpp/header"> Standard library headers</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../concept.html" title="cpp/concept"> Concepts</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../utility.html" title="cpp/utility"> Utilities library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../string.html" title="cpp/string"> Strings library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../container.html" title="cpp/container"> Containers library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../algorithm.html" title="cpp/algorithm"> Algorithms library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../iterator.html" title="cpp/iterator"> Iterators library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../numeric.html" title="cpp/numeric"> Numerics library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../io.html" title="cpp/io"> Input/output library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../locale.html" title="cpp/locale"> Localizations library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../regex.html" title="cpp/regex"> Regular expressions library</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../atomic.html" title="cpp/atomic"> Atomic operations library</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../thread.html" title="cpp/thread"> Thread support library</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../experimental.html" title="cpp/experimental"> Technical Specifications</a> </td></tr>
</table></div>
<div></div>
</div></div>
</div>
<div class="t-navbar-sep"> </div>
<div class="t-navbar-head">
<a href="../../memory.html" title="cpp/memory"> Dynamic memory management</a><div class="t-navbar-menu"><div>
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h1"><td colspan="5"> Smart pointers</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../unique_ptr.html" title="cpp/memory/unique ptr"><span class="t-lines"><span>unique_ptr</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../shared_ptr.html" title="cpp/memory/shared ptr"><span class="t-lines"><span>shared_ptr</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../weak_ptr.html" title="cpp/memory/weak ptr"><span class="t-lines"><span>weak_ptr</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../auto_ptr.html" title="cpp/memory/auto ptr"><span class="t-lines"><span>auto_ptr</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-until-cxx17">(until C++17)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../owner_less.html" title="cpp/memory/owner less"><span class="t-lines"><span>owner_less</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../enable_shared_from_this.html" title="cpp/memory/enable shared from this"><span class="t-lines"><span>enable_shared_from_this</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../bad_weak_ptr.html" title="cpp/memory/bad weak ptr"><span class="t-lines"><span>bad_weak_ptr</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../default_delete.html" title="cpp/memory/default delete"><span class="t-lines"><span>default_delete</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> Allocators</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../allocator.html" title="cpp/memory/allocator"><span class="t-lines"><span>allocator</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../allocator_traits.html" title="cpp/memory/allocator traits"><span class="t-lines"><span>allocator_traits</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../allocator_arg_t.html" title="cpp/memory/allocator arg t"><span class="t-lines"><span>allocator_arg_t</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../allocator_arg.html" title="cpp/memory/allocator arg"><span class="t-lines"><span>allocator_arg</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../uses_allocator.html" title="cpp/memory/uses allocator"><span class="t-lines"><span>uses_allocator</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../scoped_allocator_adaptor.html" title="cpp/memory/scoped allocator adaptor"><span class="t-lines"><span>scoped_allocator_adaptor</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> Uninitialized storage</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../uninitialized_copy.html" title="cpp/memory/uninitialized copy"><span class="t-lines"><span>uninitialized_copy</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../uninitialized_copy_n.html" title="cpp/memory/uninitialized copy n"><span class="t-lines"><span>uninitialized_copy_n</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../uninitialized_fill.html" title="cpp/memory/uninitialized fill"><span class="t-lines"><span>uninitialized_fill</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../uninitialized_fill_n.html" title="cpp/memory/uninitialized fill n"><span class="t-lines"><span>uninitialized_fill_n</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../raw_storage_iterator.html" title="cpp/memory/raw storage iterator"><span class="t-lines"><span>raw_storage_iterator</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../get_temporary_buffer.html" title="cpp/memory/get temporary buffer"><span class="t-lines"><span>get_temporary_buffer</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../return_temporary_buffer.html" title="cpp/memory/return temporary buffer"><span class="t-lines"><span>return_temporary_buffer</span></span></a></div></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> Garbage collection support</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../gc/declare_reachable.html" title="cpp/memory/gc/declare reachable"><span class="t-lines"><span>declare_reachable</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../gc/undeclare_reachable.html" title="cpp/memory/gc/undeclare reachable"><span class="t-lines"><span>undeclare_reachable</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../gc/declare_no_pointers.html" title="cpp/memory/gc/declare no pointers"><span class="t-lines"><span>declare_no_pointers</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../gc/undeclare_no_pointers.html" title="cpp/memory/gc/undeclare no pointers"><span class="t-lines"><span>undeclare_no_pointers</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../gc/pointer_safety.html" title="cpp/memory/gc/pointer safety"><span class="t-lines"><span>pointer_safety</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../gc/get_pointer_safety.html" title="cpp/memory/gc/get pointer safety"><span class="t-lines"><span>get_pointer_safety</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> Miscellaneous</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../pointer_traits.html" title="cpp/memory/pointer traits"><span class="t-lines"><span>pointer_traits</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../addressof.html" title="cpp/memory/addressof"><span class="t-lines"><span>addressof</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table">
<div><a href="../align.html" title="cpp/memory/align"><span class="t-lines"><span>align</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> <a href="../c.html" title="cpp/memory/c">C Library</a>
</td></tr>
<tr class="t-nv-col-table">
<td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../c/malloc.html" title="cpp/memory/c/malloc"><span class="t-lines"><span>malloc</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../c/calloc.html" title="cpp/memory/c/calloc"><span class="t-lines"><span>calloc</span></span></a></div></div></td></tr>
</table></div></td>
<td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../c/realloc.html" title="cpp/memory/c/realloc"><span class="t-lines"><span>realloc</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../c/free.html" title="cpp/memory/c/free"><span class="t-lines"><span>free</span></span></a></div></div></td></tr>
</table></div></td>
</tr>
<tr class="t-nv-h1"><td colspan="5"> <a href="../new.1.html" title="cpp/memory/new">Low level memory management</a>
</td></tr>
</table></div>
<div></div>
</div></div>
</div>
<div class="t-navbar-sep"> </div>
<div class="t-navbar-head">
<a href="../scoped_allocator_adaptor.html" title="cpp/memory/scoped allocator adaptor"><tt>std::scoped_allocator_adaptor</tt></a><div class="t-navbar-menu"><div>
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h1"><td colspan="5"> Member functions</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="scoped_allocator_adaptor.html" title="cpp/memory/scoped allocator adaptor/scoped allocator adaptor"><span class="t-lines"><span>scoped_allocator_adaptor::scoped_allocator_adaptor</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="%7Escoped_allocator_adaptor.html" title="cpp/memory/scoped allocator adaptor/~scoped allocator adaptor"><span class="t-lines"><span>scoped_allocator_adaptor::~scoped_allocator_adaptor</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="inner_allocator.html" title="cpp/memory/scoped allocator adaptor/inner allocator"><span class="t-lines"><span>scoped_allocator_adaptor::inner_allocator</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="outer_allocator.html" title="cpp/memory/scoped allocator adaptor/outer allocator"><span class="t-lines"><span>scoped_allocator_adaptor::outer_allocator</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="allocate.html" title="cpp/memory/scoped allocator adaptor/allocate"><span class="t-lines"><span>scoped_allocator_adaptor::allocate</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="deallocate.html" title="cpp/memory/scoped allocator adaptor/deallocate"><span class="t-lines"><span>scoped_allocator_adaptor::deallocate</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="max_size.html" title="cpp/memory/scoped allocator adaptor/max size"><span class="t-lines"><span>scoped_allocator_adaptor::max_size</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>scoped_allocator_adaptor::construct</span></span></strong></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="destroy.html" title="cpp/memory/scoped allocator adaptor/destroy"><span class="t-lines"><span>scoped_allocator_adaptor::destroy</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="select_on_container_copy_construction.html" title="cpp/memory/scoped allocator adaptor/select on container copy construction"><span class="t-lines"><span>scoped_allocator_adaptor::select_on_container_copy_construction</span></span></a></div></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> Non-member functions</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="operator_cmp.html" title="cpp/memory/scoped allocator adaptor/operator cmp"><span class="t-lines"><span>operator==</span><span>operator!=</span></span></a></div></div></td></tr>
</table></div>
<div></div>
</div></div>
</div>
<div class="t-navbar-sep"> </div>
</div>
<table class="t-dcl-begin"><tbody>
<tr class="t-dsc-header">
<td> <div>Defined in header <code><a href="../../header/scoped_allocator.html" title="cpp/header/scoped allocator">&lt;scoped_allocator&gt;</a></code>
 </div>
</td>
<td></td>
<td></td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span> <span class="sy1">&lt;</span> <span class="kw1">class</span> T, <span class="kw1">class</span>... <span class="me1">Args</span> <span class="sy1">&gt;</span><br>
<span class="kw4">void</span> construct<span class="br0">(</span> T<span class="sy2">*</span> p, Args<span class="sy3">&amp;&amp;</span>... <span class="me1">args</span> <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td> (1) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> T1, <span class="kw1">class</span> T2, <span class="kw1">class</span>... <span class="me1">Args1</span>, <span class="kw1">class</span>... <span class="me1">Args2</span> <span class="sy1">&gt;</span><br>
<p><span class="kw4">void</span> construct<span class="br0">(</span> <a href="../../utility/pair.html"><span class="kw906">std::<span class="me2">pair</span></span></a><span class="sy1">&lt;</span>T1, T2<span class="sy1">&gt;</span><span class="sy2">*</span> p,<br>
                <a href="../../utility/piecewise_construct_t.html"><span class="kw911">std::<span class="me2">piecewise_construct_t</span></span></a>,<br>
                <a href="../../utility/tuple.html"><span class="kw908">std::<span class="me2">tuple</span></span></a><span class="sy1">&lt;</span>Args1...<span class="sy1">&gt;</span> x,<br>
</p>
                <a href="../../utility/tuple.html"><span class="kw908">std::<span class="me2">tuple</span></span></a><span class="sy1">&lt;</span>Args2...<span class="sy1">&gt;</span> y <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td> (2) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> T1, <span class="kw1">class</span> T2 <span class="sy1">&gt;</span><br>
<span class="kw4">void</span> construct<span class="br0">(</span> <a href="../../utility/pair.html"><span class="kw906">std::<span class="me2">pair</span></span></a><span class="sy1">&lt;</span>T1, T2<span class="sy1">&gt;</span><span class="sy2">*</span> p <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td> (3) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> T1, <span class="kw1">class</span> T2, <span class="kw1">class</span> U, <span class="kw1">class</span> V <span class="sy1">&gt;</span><br>
<span class="kw4">void</span> construct<span class="br0">(</span> <a href="../../utility/pair.html"><span class="kw906">std::<span class="me2">pair</span></span></a><span class="sy1">&lt;</span>T1, T2<span class="sy1">&gt;</span><span class="sy2">*</span> p, U<span class="sy3">&amp;&amp;</span> x, V<span class="sy3">&amp;&amp;</span> y <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td> (4) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> T1, <span class="kw1">class</span> T2, <span class="kw1">class</span> U, <span class="kw1">class</span> V <span class="sy1">&gt;</span><br>
<span class="kw4">void</span> construct<span class="br0">(</span> <a href="../../utility/pair.html"><span class="kw906">std::<span class="me2">pair</span></span></a><span class="sy1">&lt;</span>T1, T2<span class="sy1">&gt;</span><span class="sy2">*</span> p, <span class="kw4">const</span> <a href="../../utility/pair.html"><span class="kw906">std::<span class="me2">pair</span></span></a><span class="sy1">&lt;</span>U, V<span class="sy1">&gt;</span><span class="sy3">&amp;</span> xy <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td> (5) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> T1, <span class="kw1">class</span> T2, <span class="kw1">class</span> U, <span class="kw1">class</span> V <span class="sy1">&gt;</span><br>
<span class="kw4">void</span> construct<span class="br0">(</span> <a href="../../utility/pair.html"><span class="kw906">std::<span class="me2">pair</span></span></a><span class="sy1">&lt;</span>T1, T2<span class="sy1">&gt;</span><span class="sy2">*</span> p, <a href="../../utility/pair.html"><span class="kw906">std::<span class="me2">pair</span></span></a><span class="sy1">&lt;</span>U, V<span class="sy1">&gt;</span><span class="sy3">&amp;&amp;</span> xy <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td> (6) </td>
<td class="t-dcl-nopad">  </td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
<p>Constructs an object in allocated, but not initialized storage pointed to by <code>p</code> using OuterAllocator and the provided constructor arguments. If the object is of type that itself uses allocators, or if it is std::pair, passes InnerAllocator down to the constructed object.
</p>
<p>First, determines the outermost allocator type <code>OUTERMOST</code>: it is the type that would be returned by calling <span class="t-c"><span class="mw-geshi cpp source-cpp">this<span class="sy2">-</span><span class="sy1">&gt;</span>outer_allocator<span class="br0">(</span><span class="br0">)</span></span></span>, and then calling the <code>outer_allocator()</code> member function recursively on the result of this call until reaching the type that has no such member function. That type is the outermost allocator.
</p>
<p>Then:
</p>
<p>1) If <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../uses_allocator.html"><span class="kw575">std::<span class="me2">uses_allocator</span></span></a><span class="sy1">&lt;</span>T, inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">false</span></span></span> (the type <code>T</code> does not use allocators) and if <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../types/is_constructible.html"><span class="kw475">std::<span class="me2">is_constructible</span></span></a><span class="sy1">&lt;</span>T, Args...<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>, then calls
</p>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../allocator_traits.html"><span class="kw572">std::<span class="me2">allocator_traits</span></span></a><span class="sy1">&lt;</span>OUTERMOST<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">construct</span><span class="br0">(</span> OUTERMOST<span class="br0">(</span><span class="sy2">*</span>this<span class="br0">)</span>,<br>
                                             p,<br>
                                             <a href="../../utility/forward.html"><span class="kw920">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>Args<span class="sy1">&gt;</span><span class="br0">(</span>args<span class="br0">)</span>... <span class="br0">)</span><span class="sy4">;</span></span></span>
</p>
<p>Otherwise, if <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../uses_allocator.html"><span class="kw575">std::<span class="me2">uses_allocator</span></span></a><span class="sy1">&lt;</span>T, inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span> (the type <code>T</code> uses allocators, e.g. it is a container) and if <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../types/is_constructible.html"><span class="kw475">std::<span class="me2">is_constructible</span></span></a><span class="sy1">&lt;</span>T, <a href="../allocator_arg_t.html"><span class="kw573">std::<span class="me2">allocator_arg_t</span></span></a>, inner_allocator_type, Args...<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>, then calls 
</p>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../allocator_traits.html"><span class="kw572">std::<span class="me2">allocator_traits</span></span></a><span class="sy1">&lt;</span>OUTERMOST<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">construct</span><span class="br0">(</span> OUTERMOST<span class="br0">(</span><span class="sy2">*</span>this<span class="br0">)</span>,<br>
                                             p,<br>
                                             <a href="../allocator_arg.html"><span class="kw574">std::<span class="me2">allocator_arg</span></span></a>,<br>
                                             inner_allocator<span class="br0">(</span><span class="br0">)</span>,<br>
                                             <a href="../../utility/forward.html"><span class="kw920">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>Args<span class="sy1">&gt;</span><span class="br0">(</span>args<span class="br0">)</span>... <span class="br0">)</span><span class="sy4">;</span></span></span>
</p>
<p>Otherwise, <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../uses_allocator.html"><span class="kw575">std::<span class="me2">uses_allocator</span></span></a><span class="sy1">&lt;</span>T, inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span> (the type <code>T</code> uses allocators, e.g. it is a container) and if <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../types/is_constructible.html"><span class="kw475">std::<span class="me2">is_constructible</span></span></a><span class="sy1">&lt;</span>T, Args..., inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>, then calls
</p>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../allocator_traits.html"><span class="kw572">std::<span class="me2">allocator_traits</span></span></a><span class="sy1">&lt;</span>OUTERMOST<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">construct</span><span class="br0">(</span> OUTERMOST<span class="br0">(</span><span class="sy2">*</span>this<span class="br0">)</span>,<br>
                                             p,<br>
                                             <a href="../../utility/forward.html"><span class="kw920">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>Args<span class="sy1">&gt;</span><span class="br0">(</span>args<span class="br0">)</span>...,<br>
                                             inner_allocator<span class="br0">(</span><span class="br0">)</span><span class="br0">)</span><span class="sy4">;</span></span></span>
</p>
<p>Otherwise, compilation error is issued because although <code>std::uses_allocator&lt;T&gt;</code> claimed that <code>T</code> is allocator-aware, it lacks either form of allocator-accepting constructors.
</p>
<p>2) First, if either <code>T1</code> or <code>T2</code> is allocator-aware, modifies the tuples <code>x</code> and <code>y</code> to include the appropriate inner allocator, resulting in the two new tuples <code>xprime</code> and <code>yprime</code>, according to the following three rules:
</p>
<p>2a) if <code>T1</code> is not allocator-aware (<span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../uses_allocator.html"><span class="kw575">std::<span class="me2">uses_allocator</span></span></a><span class="sy1">&lt;</span>T1, inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">false</span></span></span>, then <code>xprime</code> is <code>x</code>, unmodified. (it is also required that <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../types/is_constructible.html"><span class="kw475">std::<span class="me2">is_constructible</span></span></a><span class="sy1">&lt;</span>T1, Args1...<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>)
</p>
<p>2b) if <code>T1</code> is allocator-aware (<span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../uses_allocator.html"><span class="kw575">std::<span class="me2">uses_allocator</span></span></a><span class="sy1">&lt;</span>T1, inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>), and its constructor takes an allocator tag (<span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../types/is_constructible.html"><span class="kw475">std::<span class="me2">is_constructible</span></span></a><span class="sy1">&lt;</span>T1, <a href="../allocator_arg_t.html"><span class="kw573">std::<span class="me2">allocator_arg_t</span></span></a>, inner_allocator_type, Args1...<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>, then <code>xprime</code> is
<span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../utility/tuple/tuple_cat.html"><span class="kw918">std::<span class="me2">tuple_cat</span></span></a><span class="br0">(</span> <a href="../../utility/tuple.html"><span class="kw908">std::<span class="me2">tuple</span></span></a><span class="sy1">&lt;</span><a href="../allocator_arg_t.html"><span class="kw573">std::<span class="me2">allocator_arg_t</span></span></a>, inner_allocator_type<span class="sy3">&amp;</span><span class="sy1">&gt;</span><span class="br0">(</span> <a href="../allocator_arg.html"><span class="kw574">std::<span class="me2">allocator_arg</span></span></a>,<br>
                                                                         inner_allocator<span class="br0">(</span><span class="br0">)</span><br>
                                                                       <span class="br0">)</span>, <a href="../../utility/move.html"><span class="kw922">std::<span class="me2">move</span></span></a><span class="br0">(</span>x<span class="br0">)</span><span class="br0">)</span></span></span>
</p>
<p>2c) if <code>T1</code> is allocator-aware (<span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../uses_allocator.html"><span class="kw575">std::<span class="me2">uses_allocator</span></span></a><span class="sy1">&lt;</span>T1, inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>), and its constructor takes the allocator as the last argument (<span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../types/is_constructible.html"><span class="kw475">std::<span class="me2">is_constructible</span></span></a><span class="sy1">&lt;</span>T1, Args1..., inner_allocator_type<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">value</span><span class="sy1">==</span><span class="kw2">true</span></span></span>), then <code>xprime</code> is  <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../utility/tuple/tuple_cat.html"><span class="kw918">std::<span class="me2">tuple_cat</span></span></a><span class="br0">(</span><a href="../../utility/move.html"><span class="kw922">std::<span class="me2">move</span></span></a><span class="br0">(</span>x<span class="br0">)</span>, <a href="../../utility/tuple.html"><span class="kw908">std::<span class="me2">tuple</span></span></a><span class="sy1">&lt;</span>inner_allocator_type<span class="sy3">&amp;</span><span class="sy1">&gt;</span><span class="br0">(</span>inner_allocator<span class="br0">(</span><span class="br0">)</span><span class="br0">)</span><span class="br0">)</span></span></span>.
</p>
<p>Same rules apply to <code>T2</code> and the replacement of <code>y</code> with <code>yprime</code>
</p>
<p>Once <code>xprime</code> and <code>yprime</code> are constructed (this also requires that all types in Args1... and Args2... are <a href="../../concept/CopyConstructible.html" title="cpp/concept/CopyConstructible"><code>CopyConstructible</code></a>), constructs the pair <code>p</code> in allocated storage by calling
</p>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../allocator_traits.html"><span class="kw572">std::<span class="me2">allocator_traits</span></span></a><span class="sy1">&lt;</span>OUTERMOST<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">construct</span><span class="br0">(</span> OUTERMOST<span class="br0">(</span><span class="sy2">*</span>this<span class="br0">)</span>,<br>
                                             p,<br>
                                             <a href="../../utility/piecewise_construct.html"><span class="kw912">std::<span class="me2">piecewise_construct</span></span></a>,<br>
                                             <a href="../../utility/move.html"><span class="kw922">std::<span class="me2">move</span></span></a><span class="br0">(</span>xprime<span class="br0">)</span>,<br>
                                             <a href="../../utility/move.html"><span class="kw922">std::<span class="me2">move</span></span></a><span class="br0">(</span>yprime<span class="br0">)</span><span class="br0">)</span><span class="sy4">;</span></span></span>
</p>
<p><br>
3) Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp">construct<span class="br0">(</span>p, <a href="../../utility/piecewise_construct.html"><span class="kw912">std::<span class="me2">piecewise_construct</span></span></a>, <a href="../../utility/tuple.html"><span class="kw908">std::<span class="me2">tuple</span></span></a><span class="sy1">&lt;&gt;</span><span class="br0">(</span><span class="br0">)</span>, <a href="../../utility/tuple.html"><span class="kw908">std::<span class="me2">tuple</span></span></a><span class="sy1">&lt;&gt;</span><span class="br0">(</span><span class="br0">)</span><span class="br0">)</span></span></span>, that is, passes the inner allocator on to the pair's member types if they accept them.
</p>
<p>4) Equivalent to
</p>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp">construct<span class="br0">(</span>p, <a href="../../utility/piecewise_construct.html"><span class="kw912">std::<span class="me2">piecewise_construct</span></span></a>, <a href="../../utility/tuple/forward_as_tuple.html"><span class="kw917">std::<span class="me2">forward_as_tuple</span></span></a><span class="br0">(</span><a href="../../utility/forward.html"><span class="kw920">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>U<span class="sy1">&gt;</span><span class="br0">(</span>x<span class="br0">)</span><span class="br0">)</span>,<br>
                                           <a href="../../utility/tuple/forward_as_tuple.html"><span class="kw917">std::<span class="me2">forward_as_tuple</span></span></a><span class="br0">(</span><a href="../../utility/forward.html"><span class="kw920">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>V<span class="sy1">&gt;</span><span class="br0">(</span>y<span class="br0">)</span><span class="br0">)</span><span class="br0">)</span></span></span>
</p>
<p>5) Equivalent to
</p>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp">construct<span class="br0">(</span>p, <a href="../../utility/piecewise_construct.html"><span class="kw912">std::<span class="me2">piecewise_construct</span></span></a>, <a href="../../utility/tuple/forward_as_tuple.html"><span class="kw917">std::<span class="me2">forward_as_tuple</span></span></a><span class="br0">(</span>xy.<span class="me1">first</span><span class="br0">)</span>,<br>
                                           <a href="../../utility/tuple/forward_as_tuple.html"><span class="kw917">std::<span class="me2">forward_as_tuple</span></span></a><span class="br0">(</span>xy.<span class="me1">second</span><span class="br0">)</span><span class="br0">)</span></span></span>
</p>
<p>6) Equivalent to
</p>
<p><span class="t-c"><span class="mw-geshi cpp source-cpp">construct<span class="br0">(</span>p, <a href="../../utility/piecewise_construct.html"><span class="kw912">std::<span class="me2">piecewise_construct</span></span></a>, <a href="../../utility/tuple/forward_as_tuple.html"><span class="kw917">std::<span class="me2">forward_as_tuple</span></span></a><span class="br0">(</span><a href="../../utility/forward.html"><span class="kw920">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>U<span class="sy1">&gt;</span><span class="br0">(</span>xy.<span class="me1">first</span><span class="br0">)</span><span class="br0">)</span>,<br>
                                           <a href="../../utility/tuple/forward_as_tuple.html"><span class="kw917">std::<span class="me2">forward_as_tuple</span></span></a><span class="br0">(</span><a href="../../utility/forward.html"><span class="kw920">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>V<span class="sy1">&gt;</span><span class="br0">(</span>xy.<span class="me1">second</span><span class="br0">)</span><span class="br0">)</span><span class="br0">)</span></span></span>
</p>
<table id="toc" class="toc"><tr><td>
<div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="construct.html#Parameters"><span class="tocnumber">1</span> <span class="toctext">Parameters</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="construct.html#Return_value"><span class="tocnumber">2</span> <span class="toctext">Return value</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="construct.html#Notes"><span class="tocnumber">3</span> <span class="toctext">Notes</span></a></li>
<li class="toclevel-1 tocsection-4"><a href="construct.html#See_also"><span class="tocnumber">4</span> <span class="toctext">See also</span></a></li>
</ul>
</td></tr></table>
<h3>
<span class="editsection">[<a href="http%3A//en.cppreference.com/mwiki/index.php" title="Edit section: Parameters">edit</a>]</span> <span class="mw-headline" id="Parameters">Parameters</span>
</h3>
<table class="t-par-begin">


<tr class="t-par">
<td>  p
</td>
<td> -
</td>
<td>  pointer to allocated, but not initialized storage
</td>
</tr>
<tr class="t-par">
<td>  args...
</td>
<td> -
</td>
<td>  the constructor arguments to pass to the constructor of <code>T</code>
</td>
</tr>
<tr class="t-par">
<td>  x
</td>
<td> -
</td>
<td>  the constructor arguments to pass to the constructor of <code>T1</code>
</td>
</tr>
<tr class="t-par">
<td>  y
</td>
<td> -
</td>
<td>  the constructor arguments to pass to the constructor of <code>T2</code>
</td>
</tr>
<tr class="t-par">
<td>  xy
</td>
<td> -
</td>
<td>  the pair whose two members are the constructor arguments for <code>T1</code> and <code>T2</code>
</td>
</tr>
</table>
<h3>
<span class="editsection">[<a href="http%3A//en.cppreference.com/mwiki/index.php" title="Edit section: Return value">edit</a>]</span> <span class="mw-headline" id="Return_value">Return value</span>
</h3>
<p>(none)
</p>
<h3>
<span class="editsection">[<a href="http%3A//en.cppreference.com/mwiki/index.php" title="Edit section: Notes">edit</a>]</span> <span class="mw-headline" id="Notes">Notes</span>
</h3>
<p>This function is called (through <span class="t-lc"><a href="../allocator_traits.html" title="cpp/memory/allocator traits">std::allocator_traits</a></span>) by any allocator-aware object, such as <span class="t-lc"><a href="../../container/vector.html" title="cpp/container/vector">std::vector</a></span>, that was given a <span class="t-lc"><a href="../scoped_allocator_adaptor.html" title="cpp/memory/scoped allocator adaptor">std::scoped_allocator_adaptor</a></span> as the allocator to use. Since <code>inner_allocator</code> is itself an instance of <span class="t-lc"><a href="../scoped_allocator_adaptor.html" title="cpp/memory/scoped allocator adaptor">std::scoped_allocator_adaptor</a></span>, this function will also be called when the allocator-aware objects constructed through this function start constructing their own members.
</p>
<h3>
<span class="editsection">[<a href="http%3A//en.cppreference.com/mwiki/index.php" title="Edit section: See also">edit</a>]</span> <span class="mw-headline" id="See_also">See also</span>
</h3>
<table class="t-dsc-begin">

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div">
<div><a href="../allocator_traits/construct.html" title="cpp/memory/allocator traits/construct"> <span class="t-lines"><span>construct</span></span></a></div>
<div><span class="t-lines"><span><span class="t-cmark">[static]</span></span></span></div>
</div>
</td>
<td>   constructs an object in the allocated storage <br> <span class="t-mark">(function template)</span> 
</td>
</tr>

<tr class="t-dsc">
<td>  <div class="t-dsc-member-div"><div><a href="../allocator/construct.html" title="cpp/memory/allocator/construct"> <span class="t-lines"><span>construct</span></span></a></div></div>
</td>
<td>   constructs an object in allocated storage <br> <span class="t-mark">(public member function of <code>std::allocator</code>)</span> 
</td>
</tr>
</table>

<!-- 
NewPP limit report
Preprocessor visited node count: 5390/1000000
Preprocessor generated node count: 9236/1000000
Post‐expand include size: 134375/2097152 bytes
Template argument size: 30640/2097152 bytes
Highest expansion depth: 32/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_en_:pcache:idhash:5678-0!*!0!!en!*!* and timestamp 20150801122509 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    Retrieved from "<a href="http%3A//en.cppreference.com/mwiki/index.php">http://en.cppreference.com/mwiki/index.php?title=cpp/memory/scoped_allocator_adaptor/construct&amp;oldid=80245</a>"                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <div id="catlinks" class="catlinks catlinks-allhidden"></div>                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../../../../common/site_scripts.js"></script>

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.079 secs. -->
	</body>
<!-- Cached 20150801235409 -->
</html>
